package com.yunji.cabinet.vo;

import com.yunji.cabinet.domain.ContainerCell;
import com.yunji.common.annotation.Excel;
import com.yunji.common.utils.StringUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
public class CabinetVO {
    @ApiModelProperty("货柜ID")
    @Excel(name = "货柜ID", width = 15)
    private Long containerId;

    @ApiModelProperty("货柜名称")
    @Excel(name = "货柜名称", width = 15)
    private String containerName;

    @ApiModelProperty("芯片Imei")
    @Excel(name = "芯片Imei", width = 15)
    private String chipImei;

    @ApiModelProperty("芯片Sn")
    @Excel(name = "芯片Sn", width = 15)
    private String chipSn;

    @ApiModelProperty(value = "二维码Code")
    @Excel(name = "二维码Code")
    private String qrCode;

    @ApiModelProperty("网点ID")
    @Excel(name = "网点ID", width = 15)
    private Long siteId;

    @ApiModelProperty("网点名称")
    @Excel(name = "网点名称", width = 15)
    private String siteName;

    @ApiModelProperty("状态 0-离线 1-在线")
    @Excel(name = "状态 0-离线 1-在线")
    private Integer onlineStatus;


    @ApiModelProperty("代理ID")
    @Excel(name = "代理ID", width = 15)
    private Long agentId;

    @ApiModelProperty("代理名称")
    @Excel(name = "代理名称", width = 15)
    private String agentName;

    @ApiModelProperty("员工ID")
    @Excel(name = "员工ID", width = 15)
    private Long staffId;

    @ApiModelProperty("员工名称")
    @Excel(name = "员工名称", width = 15)
    private String staffName;

    @ApiModelProperty("货柜储物格数")
    @Excel(name = "货柜储物格数", width = 15)
    private Integer nums;

    @ApiModelProperty("网点地址")
    @Excel(name = "网点地址", width = 15)
    private String region;

    @ApiModelProperty("网点详细地址")
    @Excel(name = "网点详细地址", width = 15)
    private String address;

    @ApiModelProperty("在线时间")
    private String onlineTime;

    @ApiModelProperty("离线时间")
    private String offlineTime;

    private String provinceName;
    private String cityName;
    private String countyName;

    @ApiModelProperty("空柜数量")
    @Excel(name = "空柜数量", width = 15)
    private Integer emptyContainerNums;

    @ApiModelProperty("货柜权限 0-无权限 1-有权限")
    @Excel(name = "货柜权限 0-无权限 1-有权限")
    private Integer accreditStatus;

    @ApiModelProperty("空柜格子信息")
    @Excel(name = "空柜格子信息", width = 15)
    private List<ContainerCell> emptyContainerCells;

    @ApiModelProperty("货柜格子信息")
    @Excel(name = "货柜格子信息", width = 15)
    private List<CabinetCellVO> cells;

    public String getAddress() {
        return StringUtils.concat(getProvinceName(), getCityName(), getCountyName(), this.address);
    }
}
